/**
 * 
 */
package cn.gov.msa.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import cn.gov.msa.dao.VSelectBusinessQueryMapper;
import cn.gov.msa.model.VSelectBusinessQuery;
import cn.gov.msa.pagehelper.CustomPageHelper;
import cn.gov.msa.service.QueryService;

/**
 * @author Administrator
 *
 */
public class QueryServiceImpl implements QueryService {
	
	@Autowired
	VSelectBusinessQueryMapper vSelectBusinessQueryMapper;

	@Override
	public List<VSelectBusinessQuery>  selectData(int pageNum, int pageSize, VSelectBusinessQuery vSelectBusinessQuery) throws Exception {
	  String[] queryParam = new String[3];
	  queryParam[0] = "cn.gov.msa.pagehelper.CustomOracleParse";
	  queryParam[1] = "fnc_getorgnamebyorg(orgcode) orgname"; 
	  queryParam[2] =" fnc_getdictnamebycode('DM_XKXMLX', itemtypecode) itemtype";
	  CustomPageHelper.startPage(pageNum, pageSize,queryParam);
        //读取数据库信息
	    List<VSelectBusinessQuery> vSelectBusinessQueryList = vSelectBusinessQueryMapper.selectData(vSelectBusinessQuery);

	    return vSelectBusinessQueryList;
	}
}
